package com.itheima.map;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;

public class Demo04 {

    public static void main(String[] args) {
        Map<String ,Integer> map= new HashMap<>();
        map.put("坤坤",26);
        map.put("签签",32);
        map.put("滔滔",28);
        map.put("小鹿",30);


        map.forEach(new BiConsumer<String, Integer>() {
            @Override
            public void accept(String s, Integer integer) {
                System.out.print("键:"+s+"======");
                System.out.println("值:"+integer);
            }
        });
      map.forEach((k,v)-> System.out.println(k+"===="+v));

    }
}
